import App from './App'
import store from './store'
import messages from './locale/index'
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
let i18nConfig = {
  locale: uni.getStorageSync('appLanguage')||uni.getLocale(),
  messages
}
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)
App.mpType = 'app'
const app = new Vue({
	i18n,
	store,
	...App
})
// 引入请求封装
require('./util/request/index')(app)
import addInterceptor from '@/common/addInterceptor.js'
Vue.use(addInterceptor, app)
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif